package com.arsl.server.db;

import java.sql.Date;
import java.util.HashMap;

import org.apache.ibatis.annotations.Param;

import com.arsl.client.data.ARPage;
import com.arsl.client.data.Content;
import com.arsl.client.data.Edition;
import com.arsl.client.data.Paper;
import com.arsl.client.data.Publication;
import com.arsl.client.data.Publisher;
import com.arsl.client.data.Section;
import com.arsl.client.data.SectionStats;
import com.arsl.client.data.Tag;
import com.arsl.client.data.User;

public interface DBMapper {

	public Paper[] getPapers(int i);

	public User getUser(@Param("email") String email,
			@Param("password") String password);

	public Content[] getContent(int tagId);

	public Tag[] getTags(int arPageId);

	public int addPublisher(Publisher publisher);

	public int addUser(User user);

	public int addPaper(Paper paper);

	public int addPublication(Publication publication);

	public Section[] getSections(int paperId);

	public Edition[] getEditions(int paperId);

	public int addArPage(ARPage arPage);

	public int addTag(Tag tag);

	public int addContent(Content content);

	public int addSection(Section section);

	public int addEdition(Edition edition);

	public Paper getPaper(int paperId);

	public void removeEdition(Edition edition);

	public void removeSection(Section section);

	public void changeDimensions(Paper paper);

	public Paper[] addContentToTag(HashMap<String, Integer> inputMap);

	public void setArPageImageUrl(ARPage arPage);

	public String getPageImageUrl(int arPageId);

	public Paper getPaperForArPage(int arPageId);

	public void removeTag(int tagId);

	public void removeContent(int contentId);

	public void changeTagPlacement(Tag tag);

	public void removeContentFromTag(HashMap<String, Integer> inputMap);

	public void updateContent(Content content);

	public int getHits(int arPageId);

	public void incHits(int arPageId);

	public SectionStats[] getHitStatsbySection(@Param("paperId") int paperId,
			@Param("startDate") Date startDate, @Param("endDate") Date endDate);
}
